<#import "/common/base.ftl" as base/>
<#import "/common/button.ftl" as but/>
<#import "/common/tableOpt.ftl" as tabt/>
<#import "/common/widget.ftl" as widget/>
<#assign jses=[
"/lib/echarts-4.1.min.js","/js/service/home.js","/js/app/home.js"] in base/>
<#assign csses=["/css/style.css"] in base/>

<@base.page "后台首页">
<div class="grid-content bg-purple-light">
    <el-row>
	  <el-col :span="12"><span class="home-text">门禁统计</span>
	  	<div id="main" style="width: 100%;height:60vh;"></div>
	  </el-col>
	  <el-col :span="12"><span class="home-text">待审授权申请</span>
	  		<el-button type="primary"
		    plain 
		    @click="openSq()">
		   	去审核<i class="el-icon-arrow-right el-icon--right"></i>
		  </el-button>
		  <el-row>
			  <el-col :span="24">
			  <!--表格-->
	            <el-table stripe :data="sqTableVm.data" border style="width: 100%" v-loading="sqTableVm.loading" >
	                <el-table-column prop="member.name" label="申请人" min-width="150" show-overflow-tooltip></el-table-column>                
	                <el-table-column prop="member.phone" label="手机号" width="120"  show-overflow-tooltip></el-table-column> 
	                <el-table-column prop="entrance.name" label="门禁名" min-width="120"  show-overflow-tooltip></el-table-column>                   
	                <el-table-column prop="createdTime" label="申请时间" :formatter="timestamp" min-width="100"  show-overflow-tooltip></el-table-column>                   
	            </el-table>
	           </el-col>
           </el-row>
	  </el-col>
		  
	</el-row>
	 <el-row>
	  <el-col :span="24"><span class="home-text">最新进出记录 </span>
		  <el-button type="primary"
		    plain  icon="el-icon-plus"
		    @click="openLog()">
		   	 More
		  </el-button>
		  <el-row>
			  <el-col :span="24">
			  <el-table stripe :data="logTableVm.data" border style="width: 100%" v-loading="logTableVm.loading">
	                <el-table-column prop="entrance.name" label="门禁名称" min-width="150" show-overflow-tooltip></el-table-column>                
	                <el-table-column prop="entrance.mscode" label="门禁MAC" width="200"  show-overflow-tooltip></el-table-column>
	                <el-table-column prop="member.name" label="人员" width="200"  show-overflow-tooltip></el-table-column>                     
	                <el-table-column prop="member.phone" label="手机号码" width="150"  show-overflow-tooltip></el-table-column>
	                <el-table-column prop="operate" label="动作" :formatter="formatOperate" width="150"  show-overflow-tooltip></el-table-column>
	                <el-table-column prop="createdTime" label="时间" :formatter="timestamp" width="200"  show-overflow-tooltip></el-table-column>                     
	            </el-table>
            	</el-col>
           </el-row>
	  </el-col>
	</el-row>
</div>
</@base.page>
